<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">
			<!--[if lte IE 6]></base><![endif]-->
			<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
			<meta name="keywords"
				content="学生综合信息管理平台,学生,综合,信息,管理,管理平台,学生综合,综合信息,学生平台,广东科学技术职业学院,科干,管理平台,学生信息管理,信息管理平台,学生信息网站,学生信息管理网站,科学技术,广科,广科院,广科院学生信息管理,广科院学生综合信息" />
			<title>学生综合信息管理平台</title>
			<link href="images/logo-copy.ico" rel="shortcut icon"
				type="image/x-icon" />
			<link href="css/menu.css" rel="stylesheet" type="text/css" />
			<link href="css/index.css" rel="stylesheet" type="text/css" />
			<link href="css/jquery-ui-1.8.16.custom.css" rel="stylesheet"
				type="text/css" />
			<link href="css/paging.css" rel="stylesheet" type="text/css" />
			<script language="javascript" type="text/javascript"
				src="javascript/jquery-1.6.4.js">
</script>
			<script language="javascript" type="text/javascript"
				src="javascript/jquery-ui-1.8.16.custom.min.js">
</script>
			<script language="javascript" type="text/javascript"
				src="javascript/jquery.bgiframe.js">
</script>
			<script language="javascript" type="text/javascript"
				src="javascript/common.js">
</script>

			<script type='text/javascript'
				src='dwr/interface/studentInfoAction.js'>
</script>
			<script type='text/javascript' src='dwr/engine.js'>
</script>
			<script type='text/javascript' src='dwr/util.js'>
</script>
			<script language="javascript" type="text/javascript">
$(function() {
	var studId = 1;
	studentInfoAction.loadStudentInfoById(fillData)
})
function fillData(data) {
	$("#addre").html(data.address);
	$("#zipcode").html(data.zipcode);
	$("#homeNumber").html(data.phoneNumber);
	$("#addreUp").val(data.address);
	$("#zipcodeUp").val(data.zipcode);
	$("#homeNumberUp").val(data.phoneNumber);
	var politicsList = data.politics;
	var parents = data.familyInfoList.length;
	for ( var i = 0; i < parents; i++) {
		var parentName = data.familyInfoList[i].parentName;
		var relation = data.familyInfoList[i].relation;
		var parentMobile = data.familyInfoList[i].parentMobile;
		var job = data.familyInfoList[i].job;
		var sexUp = data.familyInfoList[i].sex ? "男" : "女";
		var politicsStatus = data.familyInfoList[i].politicsStatus;
		var politicsStatusId = data.familyInfoList[i].politicsStatusId;
		var tr = '<tr><td >' + parentName + '</td><td >' + relation
				+ '</td><td>' + parentMobile + '</td><td>' + job + '</td><td>'
				+ politicsStatus + '</td></tr>';
		// var FamilyUptr='<tr><td><input type="text" id="parentNameUp" size="8" value="'+parentName+'"/></td><td><input type="text" id="relationUp" size="8" value="'+relation+'"/></td><td><input type="text" id="parentMobileUp" size="8" value="'+parentMobile+'"/></td><td><input type="text" size="8" id="jobUp" value="'+job+'"/></td><td><select id="politicsStatusUp'+i+'">'+politicsStatus+'</select></td><td>'+'<input type="button"  value="删除" onclick="familyTrDelBut(this)" >'+'</td></tr>'
		var FamilyUp = '<tr><td name="parentName">'
				+ parentName
				+ '</td><td name="relation">'
				+ relation
				+ '</td><td name="parentMobile">'
				+ parentMobile
				+ '</td><td name="job">'
				+ job
				+ '</td><td name="politicsStatus">'
				+ politicsStatus
				+ '</td><td name="politicsStatusId" style="display:none;">'
				+ politicsStatusId
				+ '</td><td><input type="button"  value="编辑" onclick="familyCompileAndAddBut(this)"/><input type="button"  value="删除" onclick="familyTrDelBut(this)" />'
				+ '</td></tr>'
		$("#showFamily").append(tr);
		$("#compileFamily").append(FamilyUp);
		var politicsList = data.politics;
//		var politicsStatusUpN = "politicsStatusUpD";
//		dwr.util.removeAllOptions(politicsStatusUpN);
//		dwr.util.addOptions(politicsStatusUpN, politicsList,
//				"politicsStatusId", "politicsStatusType");

	}
	var addButton = '<tr><td  colspan="7" ><input type="button" value="增加" align="rigth" onclick="familyTrAddBut()"/></td></tr>';
	$("#compileFamily").append(addButton);

}
</script>
	</head>
	<body>
		<jsp:include page="../common/header.jsp"></jsp:include>
		<!-- 内容区开始 -->
		<div id="menu">
			<div id="mainMenuDiv">
				<ul>
					<li>
						<a href="web/teacherSearch.jsp">教师信息管理</a>
					</li>
					<li>
						<a href="#">学生信息管理</a>
					</li>
					<li>
						<a href="web/studentInformationBasic.jsp">个人信息管理</a>
					</li>
					<li>
						<a href="web/logisticsSearchDorm.jsp">后勤管理</a>
					</li>
					<li>
						<a href="web/scoreSearch.jsp">成绩管理</a>
					</li>
					<li>
						<a href="web/attendanceSearch.jsp">考勤管理</a>
					</li>
				</ul>
			</div>
			<div id="minorMeun">
				<ul>
					<li>
						<a href="studentInfoAction">基本信息</a>
					</li>
					<li>
						<a href="web/studentInformationFamily.jsp">家庭信息</a>
					</li>
					<li>
						<a href="web/studentInformationGraduate.jsp">毕业信息</a>
					</li>
					<li>
						<a href="web/studentInformationRests.jsp">其他信息</a>
					</li>
				</ul>
			</div>

		</div>
		<div id="bodyDiv">
			<div id="bodyTitleDiv">
				<div id="breadcrumbDiv">
					当前位置：首页>
					<a href="web/studentInformationBasic.jsp"">个人信息管理</a>>
					<a href="web/studentInformationFamily.jsp">家庭信息</a>
				</div>
			</div>
			<div id="bodyCentreDiv">
				<div class="studentInformationCentre">
					<table class="table_popup1">
						<tr>

							<th colspan="4">
								编辑家庭信息
							</th>
						</tr>
						<tr>
							<td class="table_title">
								家庭住址：
							</td>
							<td colspan="3" class="table_many" id="addre">

							</td>
						</tr>
						<tr>
							<td class="table_title">
								邮政编码：
							</td>
							<td class="table_writing" id="zipcode"></td>
							<td class="table_title">
								家庭电话：
							</td>
							<td class="table_writing" align="left" id="homeNumber"></td>
						</tr>
						<tr>
							<td valign="top" class="table_title">
								家属信息：
							</td>
							<td colspan="3">
								&nbsp;
							</td>
						</tr>
						<tr>
							<td class="table_title">
								&nbsp;
							</td>
							<td colspan="3">



								<table border="0" cellpadding="6" cellspacing="1"
									class="showFamily table_centre" id="showFamily">
									<tr>
										<th>
											姓名
										</th>
										<th>
											与本人关系
										</th>
										<th>
											联系手机
										</th>
										<th>
											工作单位
										</th>
										<th>
											政治面貌
										</th>
										<th>
											操作
										</th>
									</tr>
								</table>
							</td>
						</tr>

						<tr>
							<td colspan="4">
								为了保证资料真实性有些信息不可随意修改，如确实有误请
								<a href="#"> 点击这里申诉</a>。
							</td>
						</tr>
						<tr>
							<td>
								&nbsp;
							</td>
							<td>
								&nbsp;
							</td>
							<td>
								&nbsp;
							</td>
							<td>
								<input type="button" value="编辑" onclick="alterInformationBut(2)" />
								<input type="button" value="编辑"
									onclick="alterInformationBut(21)" style="display: none;" />
								<!-------根据角色权限 显示编辑按钮 alterInformationBut(1) 学生  alterInformationBut(11)教师 教师在传参数比学生多个”1“---->
							</td>
						</tr>
					</table>
				</div>
				<div id="alterDiv2" class="studentInformationCentre"
					style="display: none;">
					<table class="table_popup1">
						<tr>
							<th colspan="4">
								编辑家庭信息
							</th>
						</tr>
						<tr>
							<td class="table_title">
								家庭住址：
							</td>
							<td colspan="3" class="table_many">

								<input type="text" size="80" maxlength="100" id="addreUp" />
							</td>
						</tr>
						<tr>
							<td class="table_title">
								邮政编码：
							</td>
							<td class="table_writing">
								<input type="text" size="8" maxlength="6" id="zipcodeUp" />
							</td>
							<td class="table_title">
								家庭电话：
							</td>
							<td class="table_writing">
								<input type="text" size="17" maxlength="34" id="homeNumberUp" />
							</td>
						</tr>
						<tr>
							<td valign="top" class="table_title">
								家属信息：
							</td>
							<td colspan="3">
								<table border="0" cellpadding="5" cellspacing="1">
									<tr>
										<td>
											<table border="0" cellpadding="6" cellspacing="1"
												class="showFamily table_centre" id="compileFamily">
												<tr>
													<th>
														姓名
													</th>
													<th>
														与本人关系
													</th>
													<th>
														联系手机
													</th>
													<th>
														工作单位
													</th>
													<th>
														政治面貌
													</th>
													<th>
														操作
													</th>
												</tr>


											</table>
										</td>
									</tr>

								</table>
							</td>
						</tr>
					</table>
				</div>
				<!---  教师编辑层 如有需要 可删除注释
        <div id="alterDiv21" class="studentInformationCentre"  style="display:none;">
            	<table class="table_popup1">
                  <tr>
                    <th colspan="4">编辑家庭信息</th>
                  </tr>
                  <tr>
                    <td class="table_title">家庭住址：</td>
                    <td colspan="3" class="table_many">
                      <select >
                        <option>请选择省</option>
                        <option>北京</option>
                        <option>广东</option>
                      </select>
                      <select >
                        <option>请选择市</option>
                        <option>潮州市</option>
                        <option>珠海市</option>
                      </select>
                      <select>
                        <option>请选择区</option>
                        <option>湘桥区</option>
                      </select>
                      <input type="text" size="30" maxlength="30" />
                  </td>
                  </tr>
                  <tr>
                    <td class="table_title">邮政编码：</td>
                    <td class="table_writing"><input type="text" size="8" maxlength="6" /></td>
                    <td class="table_title">家庭电话：</td>
                    <td class="table_writing"><input type="text" size="4" maxlength="4" />-<input type="text" size="8" maxlength="8" /></td>
                  </tr>
                  <tr>
                    <td valign="top" class="table_title">家属信息：</td>
                    <td colspan="3">
                    	<table border="0" cellpadding="5" cellspacing="1">
                          <tr>
                            <td>
                                <table border="0" cellpadding="6" cellspacing="1" class="showFamily table_centre" id="compileFamily">
                                  <tr>
                                    <th>姓名</th>
                                    <th>与本人关系</th>
                                    <th>联系手机</th>
                                    <th>工作单位</th>
                                    <th>操作</th>
                                  </tr>
                                  <tr>
                                    <td>刘日斯</td>
                                    <td>自己</td>
                                    <td>12345678912</td>
                                    <td>个体户</td>
                                    <td><input type="button"  value="编辑" onclick="familyCompileAndAddBut()"/>
                                    <input type="button"  value="删除" onclick="familyTrDelBut(this)"/></td>
                                  </tr>
                                  <tr>
                                    <td>刘日斯</td>
                                    <td>自己</td>
                                    <td>12345678912</td>
                                    <td>个体户</td>
                                    <td><input type="button"  value="编辑" onclick="familyCompileAndAddBut()"/>
                                    <input type="button"  value="删除" onclick="familyTrDelBut(this)"/></td>
                                  </tr>
                                </table>
                            </td>
                          </tr>
                          <tr>
                            <td align="right"><input type="button"  value="增加" onclick="familyCompileAndAddBut()"/></td>
                          </tr>
                      </table>
                    </td>
                  </tr>
          </table>
      </div> --->
				<div id="familyCompileAndAddDiv" style="display: none;">
					<table cellpadding="5" cellspacing="1" class="table_popup1 ">
						<tr>
							<th colspan="4">
								编辑家属信息
							</th>
						</tr>
						<tr>
							<td class="table_title">
								姓名:
							</td>
							<td class="table_writing">
								<input type="text" value="刘日dddddd斯" size="15" maxlength="10"
									id="parentNameUpD" />
							</td>
							<td class="table_title">
								与本人关系:
							</td>
							<td class="table_writing">
								<input type="text" value="我" size="20" maxlength="10"
									id="relationUpD" />
							</td>
						</tr>
						<tr>
							<td class="table_title">
								联系手机:
							</td>
							<td class="table_writing">
								<input type="text" value="123456789123" size="15" maxlength="12"
									id="parentMobileUpD" />
							</td>
							<td class="table_title">
								工作单位:
							</td>
							<td class="table_writing">
								<input type="text" value="广东科学技术职业学院" size="20" id="jobUpD" />
							</td>
						</tr>
						<tr>
							<td>
								政治面貌：
							</td>
							<td>
								 <s:select list="politicsStatusList" listKey="politicsStatusId" listValue="politicsStatusType" align="left" theme="simple" id="politicsStatusUpD"></s:select>
								
							</td>
							<td></td>
							<td></td>
						</tr>
						<tr>
							<td>
								&nbsp;
							</td>
							<td>
								&nbsp;
							</td>
							<td>
								&nbsp;
							</td>
							<td>
								&nbsp;
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
		<!-- 内容区结束 -->
		<jsp:include page="../common/footer.jsp"></jsp:include>
	</body>
</html>

